﻿using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

// Token: 0x0200039C RID: 924
public class ColorPicker : MonoBehaviour
{
	// Token: 0x17000239 RID: 569
	// (get) Token: 0x060016E2 RID: 5858 RVA: 0x00099910 File Offset: 0x00097B10
	// (set) Token: 0x060016E3 RID: 5859 RVA: 0x00099918 File Offset: 0x00097B18
	public Color EditColor
	{
		get
		{
			return this.editColor;
		}
		set
		{
			this.SetColor(value);
		}
	}

	// Token: 0x1700023A RID: 570
	// (get) Token: 0x060016E4 RID: 5860 RVA: 0x00099924 File Offset: 0x00097B24
	// (set) Token: 0x060016E5 RID: 5861 RVA: 0x0009992C File Offset: 0x00097B2C
	public bool HasAlpha
	{
		get
		{
			return this.hasAlpha;
		}
		set
		{
			this.SetHasAlpha(value);
		}
	}

	// Token: 0x060016E6 RID: 5862 RVA: 0x00099938 File Offset: 0x00097B38
	private void Awake()
	{
		this.ShaderProperty_Red = Shader.PropertyToID("_R");
		this.ShaderProperty_Green = Shader.PropertyToID("_G");
		this.ShaderProperty_Blue = Shader.PropertyToID("_B");
		this.ShaderProperty_Hue = Shader.PropertyToID("_H");
		this.ShaderProperty_Saturation = Shader.PropertyToID("_S");
		this.ShaderProperty_Value = Shader.PropertyToID("_V");
		this.sliderTypeToggles[0].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_HSV));
		this.sliderTypeToggles[1].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_RGB));
		this.barTypeToggles[0].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarH));
		this.barTypeToggles[1].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarS));
		this.barTypeToggles[2].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarV));
		this.barTypeToggles[3].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarR));
		this.barTypeToggles[4].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarG));
		this.barTypeToggles[5].onValueChanged.AddListener(new UnityAction<bool>(this.Toggle_BarB));
		this.sliders[0].AddOnChangeAction(new UnityAction<float>(this.ChangeSlider_0));
		this.sliders[1].AddOnChangeAction(new UnityAction<float>(this.ChangeSlider_1));
		this.sliders[2].AddOnChangeAction(new UnityAction<float>(this.ChangeSlider_2));
		this.sliders[3].AddOnChangeAction(new UnityAction<float>(this.ChangeSlider_3));
		this.bar.onValueChanged.AddListener(new UnityAction<float>(this.ChangeBar));
		this.squarePick.SetOnChangeAction(new Action<Vector2>(this.ChangeChart));
		this.ChangeColorRGB(this.editColor);
		this.ChangeBarType(ColorPicker.BAR_TYPE.H);
		this.ChangeSliderType(ColorPicker.SLIDER_TYPE.HSV);
	}

	// Token: 0x060016E7 RID: 5863 RVA: 0x00099B48 File Offset: 0x00097D48
	private void Update()
	{
		this.Update_Materials();
	}

	// Token: 0x060016E8 RID: 5864 RVA: 0x00099B50 File Offset: 0x00097D50
	private void Update_Materials()
	{
		if (this.barType == ColorPicker.BAR_TYPE.H)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Saturation, 1f);
			this.barBG.material.SetFloat(this.ShaderProperty_Value, 1f);
			this.chartBG.material.SetFloat(this.ShaderProperty_Hue, this.color_hue);
			this.chartBG.GraphicUpdateComplete();
		}
		else if (this.barType == ColorPicker.BAR_TYPE.S)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Hue, this.color_hue);
			this.barBG.material.SetFloat(this.ShaderProperty_Value, 1f);
			this.chartBG.material.SetFloat(this.ShaderProperty_Saturation, this.color_saturation);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.V)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Hue, this.color_hue);
			this.barBG.material.SetFloat(this.ShaderProperty_Saturation, 1f);
			this.chartBG.material.SetFloat(this.ShaderProperty_Value, this.color_value);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.R)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Green, this.editColor.g);
			this.barBG.material.SetFloat(this.ShaderProperty_Blue, this.editColor.b);
			this.chartBG.material.SetFloat(this.ShaderProperty_Red, this.editColor.r);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.G)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Red, this.editColor.r);
			this.barBG.material.SetFloat(this.ShaderProperty_Blue, this.editColor.b);
			this.chartBG.material.SetFloat(this.ShaderProperty_Green, this.editColor.g);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.B)
		{
			this.barBG.material.SetFloat(this.ShaderProperty_Red, this.editColor.r);
			this.barBG.material.SetFloat(this.ShaderProperty_Green, this.editColor.g);
			this.chartBG.material.SetFloat(this.ShaderProperty_Blue, this.editColor.b);
		}
		if (this.sliderType == ColorPicker.SLIDER_TYPE.HSV)
		{
			this.sliderBGs[0].material.SetFloat(this.ShaderProperty_Saturation, 1f);
			this.sliderBGs[0].material.SetFloat(this.ShaderProperty_Value, 1f);
			this.sliderBGs[1].material.SetFloat(this.ShaderProperty_Hue, this.color_hue);
			this.sliderBGs[1].material.SetFloat(this.ShaderProperty_Value, 1f);
			this.sliderBGs[2].material.SetFloat(this.ShaderProperty_Hue, this.color_hue);
			this.sliderBGs[2].material.SetFloat(this.ShaderProperty_Saturation, 1f);
		}
		else
		{
			this.sliderBGs[0].material.SetFloat(this.ShaderProperty_Green, this.editColor.g);
			this.sliderBGs[0].material.SetFloat(this.ShaderProperty_Blue, this.editColor.b);
			this.sliderBGs[1].material.SetFloat(this.ShaderProperty_Red, this.editColor.r);
			this.sliderBGs[1].material.SetFloat(this.ShaderProperty_Blue, this.editColor.b);
			this.sliderBGs[2].material.SetFloat(this.ShaderProperty_Red, this.editColor.r);
			this.sliderBGs[2].material.SetFloat(this.ShaderProperty_Green, this.editColor.g);
		}
		Color color = ColorPicker.InverseColor(this.editColor);
		color.a = 1f;
		this.point.color = color;
	}

	// Token: 0x060016E9 RID: 5865 RVA: 0x00099FA0 File Offset: 0x000981A0
	private void SetHasAlpha(bool flag)
	{
		this.hasAlpha = flag;
		this.sliders[3].gameObject.SetActive(this.hasAlpha);
	}

	// Token: 0x060016EA RID: 5866 RVA: 0x00099FC4 File Offset: 0x000981C4
	public void ChangeBarType(ColorPicker.BAR_TYPE type)
	{
		this.invoke = false;
		this.barType = type;
		this.bar.maxValue = ((type != ColorPicker.BAR_TYPE.H) ? 255f : 359f);
		if (type == ColorPicker.BAR_TYPE.H)
		{
			this.bar.value = this.color_hue * 359f;
			this.barBG.material = this.matBar_H;
			this.chartBG.material = this.matChart_H;
		}
		else if (type == ColorPicker.BAR_TYPE.S)
		{
			this.bar.value = this.color_saturation * 255f;
			this.barBG.material = this.matBar_S;
			this.chartBG.material = this.matChart_S;
		}
		else if (type == ColorPicker.BAR_TYPE.V)
		{
			this.bar.value = this.color_value * 255f;
			this.barBG.material = this.matBar_V;
			this.chartBG.material = this.matChart_V;
		}
		else if (type == ColorPicker.BAR_TYPE.R)
		{
			this.bar.value = this.editColor.r * 255f;
			this.barBG.material = this.matBar_R;
			this.chartBG.material = this.matChart_R;
		}
		else if (type == ColorPicker.BAR_TYPE.G)
		{
			this.bar.value = this.editColor.g * 255f;
			this.barBG.material = this.matBar_G;
			this.chartBG.material = this.matChart_G;
		}
		else if (type == ColorPicker.BAR_TYPE.B)
		{
			this.bar.value = this.editColor.b * 255f;
			this.barBG.material = this.matBar_B;
			this.chartBG.material = this.matChart_B;
		}
		this.ColorToBarChart();
		this.invoke = true;
	}

	// Token: 0x060016EB RID: 5867 RVA: 0x0009A1B4 File Offset: 0x000983B4
	public void ChangeSliderType(ColorPicker.SLIDER_TYPE type)
	{
		this.invoke = false;
		this.sliderType = type;
		if (this.sliderType == ColorPicker.SLIDER_TYPE.HSV)
		{
			for (int i = 0; i < ColorPicker.SliderNames_HSV.Length; i++)
			{
				this.sliders[i].SetTitle(ColorPicker.SliderNames_HSV[i]);
				this.sliders[i].Setup(0f, ColorPicker.SliderMax_HSV[i], false, 0f);
			}
			this.sliderBGs[0].material = this.matSlider_H;
			this.sliderBGs[1].material = this.matSlider_S;
			this.sliderBGs[2].material = this.matSlider_V;
		}
		else if (this.sliderType == ColorPicker.SLIDER_TYPE.RGB)
		{
			for (int j = 0; j < ColorPicker.SliderNames_RGB.Length; j++)
			{
				this.sliders[j].SetTitle(ColorPicker.SliderNames_RGB[j]);
				this.sliders[j].Setup(0f, ColorPicker.SliderMax_RGB[j], false, 0f);
			}
			this.sliderBGs[0].material = this.matSlider_R;
			this.sliderBGs[1].material = this.matSlider_G;
			this.sliderBGs[2].material = this.matSlider_B;
		}
		this.ColorToSliders();
		this.invoke = true;
	}

	// Token: 0x060016EC RID: 5868 RVA: 0x0009A300 File Offset: 0x00098500
	public void ChangeChart(Vector2 val)
	{
		if (!this.invoke)
		{
			return;
		}
		if (this.barType == ColorPicker.BAR_TYPE.H)
		{
			this.ChangeColorHSV(this.color_hue, val.x, val.y, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.S)
		{
			this.ChangeColorHSV(val.x, this.color_saturation, val.y, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.V)
		{
			this.ChangeColorHSV(val.x, val.y, this.color_value, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.R)
		{
			this.ChangeColorRGB(this.editColor.r, val.x, val.y, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.G)
		{
			this.ChangeColorRGB(val.x, this.editColor.g, val.y, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.B)
		{
			this.ChangeColorRGB(val.x, val.y, this.editColor.b, this.editColor.a);
		}
		this.ColorToSliders();
	}

	// Token: 0x060016ED RID: 5869 RVA: 0x0009A46C File Offset: 0x0009866C
	public void ChangeSlider_0(float val)
	{
		if (!this.invoke)
		{
			return;
		}
		this.SlidersToColor();
		this.ColorToBarChart();
	}

	// Token: 0x060016EE RID: 5870 RVA: 0x0009A488 File Offset: 0x00098688
	public void ChangeSlider_1(float val)
	{
		if (!this.invoke)
		{
			return;
		}
		this.SlidersToColor();
		this.ColorToBarChart();
	}

	// Token: 0x060016EF RID: 5871 RVA: 0x0009A4A4 File Offset: 0x000986A4
	public void ChangeSlider_2(float val)
	{
		if (!this.invoke)
		{
			return;
		}
		this.SlidersToColor();
		this.ColorToBarChart();
	}

	// Token: 0x060016F0 RID: 5872 RVA: 0x0009A4C0 File Offset: 0x000986C0
	public void ChangeSlider_3(float val)
	{
		if (!this.invoke)
		{
			return;
		}
		this.SlidersToColor();
		this.ColorToBarChart();
	}

	// Token: 0x060016F1 RID: 5873 RVA: 0x0009A4DC File Offset: 0x000986DC
	public void ChangeBar(float val)
	{
		if (!this.invoke)
		{
			return;
		}
		if (this.barType == ColorPicker.BAR_TYPE.H)
		{
			this.ChangeColorHSV(val / 359f, this.color_saturation, this.color_value, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.S)
		{
			this.ChangeColorHSV(this.color_hue, val / 255f, this.color_value, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.V)
		{
			this.ChangeColorHSV(this.color_hue, this.color_saturation, val / 255f, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.R)
		{
			this.ChangeColorRGB(val / 255f, this.editColor.g, this.editColor.b, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.G)
		{
			this.ChangeColorRGB(this.editColor.r, val / 255f, this.editColor.b, this.editColor.a);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.B)
		{
			this.ChangeColorRGB(this.editColor.r, this.editColor.g, val / 255f, this.editColor.a);
		}
		this.ColorToSliders();
	}

	// Token: 0x060016F2 RID: 5874 RVA: 0x0009A654 File Offset: 0x00098854
	private void SlidersToColor()
	{
		float a = this.editColor.a = this.sliders[3].Value / 255f;
		if (this.sliderType == ColorPicker.SLIDER_TYPE.RGB)
		{
			float r = this.sliders[0].Value / 255f;
			float g = this.sliders[1].Value / 255f;
			float b = this.sliders[2].Value / 255f;
			this.ChangeColorRGB(r, g, b, a);
		}
		else if (this.sliderType == ColorPicker.SLIDER_TYPE.HSV)
		{
			float h = this.sliders[0].Value / 359f;
			float s = this.sliders[1].Value / 255f;
			float v = this.sliders[2].Value / 255f;
			this.ChangeColorHSV(h, s, v, a);
		}
	}

	// Token: 0x060016F3 RID: 5875 RVA: 0x0009A734 File Offset: 0x00098934
	private void ColorToSliders()
	{
		bool flag = this.invoke;
		this.invoke = false;
		if (this.sliderType == ColorPicker.SLIDER_TYPE.RGB)
		{
			this.sliders[0].Value = this.editColor.r * ColorPicker.SliderMax_RGB[0];
			this.sliders[1].Value = this.editColor.g * ColorPicker.SliderMax_RGB[1];
			this.sliders[2].Value = this.editColor.b * ColorPicker.SliderMax_RGB[2];
		}
		else if (this.sliderType == ColorPicker.SLIDER_TYPE.HSV)
		{
			this.sliders[0].Value = this.color_hue * ColorPicker.SliderMax_HSV[0];
			this.sliders[1].Value = this.color_saturation * ColorPicker.SliderMax_HSV[1];
			this.sliders[2].Value = this.color_value * ColorPicker.SliderMax_HSV[2];
		}
		this.sliders[3].Value = this.editColor.a * 255f;
		this.invoke = flag;
	}

	// Token: 0x060016F4 RID: 5876 RVA: 0x0009A844 File Offset: 0x00098A44
	private void ColorToBarChart()
	{
		bool flag = this.invoke;
		this.invoke = false;
		if (this.barType == ColorPicker.BAR_TYPE.H)
		{
			this.bar.value = this.color_hue * ColorPicker.SliderMax_HSV[0];
			this.squarePick.Value = new Vector2(this.color_saturation, this.color_value);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.S)
		{
			this.bar.value = this.color_saturation * ColorPicker.SliderMax_HSV[1];
			this.squarePick.Value = new Vector2(this.color_hue, this.color_value);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.V)
		{
			this.bar.value = this.color_value * ColorPicker.SliderMax_HSV[2];
			this.squarePick.Value = new Vector2(this.color_hue, this.color_saturation);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.R)
		{
			this.bar.value = this.editColor.r * ColorPicker.SliderMax_RGB[0];
			this.squarePick.Value = new Vector2(this.editColor.g, this.editColor.b);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.G)
		{
			this.bar.value = this.editColor.g * ColorPicker.SliderMax_RGB[1];
			this.squarePick.Value = new Vector2(this.editColor.r, this.editColor.b);
		}
		else if (this.barType == ColorPicker.BAR_TYPE.B)
		{
			this.bar.value = this.editColor.b * ColorPicker.SliderMax_RGB[2];
			this.squarePick.Value = new Vector2(this.editColor.r, this.editColor.g);
		}
		this.invoke = flag;
	}

	// Token: 0x060016F5 RID: 5877 RVA: 0x0009AA34 File Offset: 0x00098C34
	private void Toggle_HSV(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeSliderType(ColorPicker.SLIDER_TYPE.HSV);
		}
	}

	// Token: 0x060016F6 RID: 5878 RVA: 0x0009AA50 File Offset: 0x00098C50
	private void Toggle_RGB(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeSliderType(ColorPicker.SLIDER_TYPE.RGB);
		}
	}

	// Token: 0x060016F7 RID: 5879 RVA: 0x0009AA6C File Offset: 0x00098C6C
	private void Toggle_BarH(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.H);
		}
	}

	// Token: 0x060016F8 RID: 5880 RVA: 0x0009AA88 File Offset: 0x00098C88
	private void Toggle_BarS(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.S);
		}
	}

	// Token: 0x060016F9 RID: 5881 RVA: 0x0009AAA4 File Offset: 0x00098CA4
	private void Toggle_BarV(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.V);
		}
	}

	// Token: 0x060016FA RID: 5882 RVA: 0x0009AAC0 File Offset: 0x00098CC0
	private void Toggle_BarR(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.R);
		}
	}

	// Token: 0x060016FB RID: 5883 RVA: 0x0009AADC File Offset: 0x00098CDC
	private void Toggle_BarG(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.G);
		}
	}

	// Token: 0x060016FC RID: 5884 RVA: 0x0009AAF8 File Offset: 0x00098CF8
	private void Toggle_BarB(bool flag)
	{
		if (!this.invoke)
		{
			return;
		}
		if (flag)
		{
			this.ChangeBarType(ColorPicker.BAR_TYPE.B);
		}
	}

	// Token: 0x060016FD RID: 5885 RVA: 0x0009AB14 File Offset: 0x00098D14
	private void ChangeColorHSV(float h, float s, float v, float a)
	{
		this.color_hue = h;
		this.color_saturation = s;
		this.color_value = v;
		this.editColor = Color.HSVToRGB(this.color_hue, this.color_saturation, this.color_value);
		this.editColor.a = a;
		this.OnChangeColor();
	}

	// Token: 0x060016FE RID: 5886 RVA: 0x0009AB68 File Offset: 0x00098D68
	private void ChangeColorRGB(Color color)
	{
		this.editColor = color;
		Color.RGBToHSV(this.editColor, out this.color_hue, out this.color_saturation, out this.color_value);
		this.OnChangeColor();
	}

	// Token: 0x060016FF RID: 5887 RVA: 0x0009AB94 File Offset: 0x00098D94
	private void ChangeColorRGB(float r, float g, float b, float a)
	{
		this.editColor.r = r;
		this.editColor.g = g;
		this.editColor.b = b;
		this.editColor.a = a;
		Color.RGBToHSV(this.editColor, out this.color_hue, out this.color_saturation, out this.color_value);
		this.OnChangeColor();
	}

	// Token: 0x06001700 RID: 5888 RVA: 0x0009ABF8 File Offset: 0x00098DF8
	public void SetColor(Color value)
	{
		if (!this.hasAlpha)
		{
			value.a = 1f;
		}
		this.ChangeColorRGB(value);
		this.ColorToBarChart();
		this.ColorToSliders();
	}

	// Token: 0x06001701 RID: 5889 RVA: 0x0009AC24 File Offset: 0x00098E24
	public void Setup(Color value, bool hasAlpha, Action<Color> onChange)
	{
		this.invoke = false;
		this.onChange = onChange;
		this.SetHasAlpha(hasAlpha);
		this.SetColor(value);
		this.invoke = true;
	}

	// Token: 0x06001702 RID: 5890 RVA: 0x0009AC4C File Offset: 0x00098E4C
	public static Color InverseColor(Color baseColor)
	{
		float num;
		float s;
		float num2;
		Color.RGBToHSV(baseColor, out num, out s, out num2);
		num = (num + 0.5f) % 1f;
		num2 = 1f - num2;
		return Color.HSVToRGB(num, s, num2);
	}

	// Token: 0x06001703 RID: 5891 RVA: 0x0009AC84 File Offset: 0x00098E84
	private void OnChangeColor()
	{
		if (!this.invoke)
		{
			return;
		}
		if (this.onChange != null)
		{
			this.onChange(this.editColor);
		}
	}

	// Token: 0x04001AA0 RID: 6816
	[SerializeField]
	private InputSliderUI[] sliders = new InputSliderUI[4];

	// Token: 0x04001AA1 RID: 6817
	[SerializeField]
	private Image[] sliderBGs = new Image[4];

	// Token: 0x04001AA2 RID: 6818
	[SerializeField]
	private Toggle[] barTypeToggles = new Toggle[6];

	// Token: 0x04001AA3 RID: 6819
	[SerializeField]
	private Toggle[] sliderTypeToggles = new Toggle[2];

	// Token: 0x04001AA4 RID: 6820
	[SerializeField]
	private Slider bar;

	// Token: 0x04001AA5 RID: 6821
	[SerializeField]
	private Image barBG;

	// Token: 0x04001AA6 RID: 6822
	[SerializeField]
	private Image chartBG;

	// Token: 0x04001AA7 RID: 6823
	[SerializeField]
	private Image point;

	// Token: 0x04001AA8 RID: 6824
	[SerializeField]
	private SquarePickUI squarePick;

	// Token: 0x04001AA9 RID: 6825
	[SerializeField]
	private Material matSlider_H;

	// Token: 0x04001AAA RID: 6826
	[SerializeField]
	private Material matSlider_S;

	// Token: 0x04001AAB RID: 6827
	[SerializeField]
	private Material matSlider_V;

	// Token: 0x04001AAC RID: 6828
	[SerializeField]
	private Material matSlider_R;

	// Token: 0x04001AAD RID: 6829
	[SerializeField]
	private Material matSlider_G;

	// Token: 0x04001AAE RID: 6830
	[SerializeField]
	private Material matSlider_B;

	// Token: 0x04001AAF RID: 6831
	[SerializeField]
	private Material matBar_H;

	// Token: 0x04001AB0 RID: 6832
	[SerializeField]
	private Material matBar_S;

	// Token: 0x04001AB1 RID: 6833
	[SerializeField]
	private Material matBar_V;

	// Token: 0x04001AB2 RID: 6834
	[SerializeField]
	private Material matBar_R;

	// Token: 0x04001AB3 RID: 6835
	[SerializeField]
	private Material matBar_G;

	// Token: 0x04001AB4 RID: 6836
	[SerializeField]
	private Material matBar_B;

	// Token: 0x04001AB5 RID: 6837
	[SerializeField]
	private Material matChart_H;

	// Token: 0x04001AB6 RID: 6838
	[SerializeField]
	private Material matChart_S;

	// Token: 0x04001AB7 RID: 6839
	[SerializeField]
	private Material matChart_V;

	// Token: 0x04001AB8 RID: 6840
	[SerializeField]
	private Material matChart_R;

	// Token: 0x04001AB9 RID: 6841
	[SerializeField]
	private Material matChart_G;

	// Token: 0x04001ABA RID: 6842
	[SerializeField]
	private Material matChart_B;

	// Token: 0x04001ABB RID: 6843
	private Color editColor;

	// Token: 0x04001ABC RID: 6844
	private float color_hue;

	// Token: 0x04001ABD RID: 6845
	private float color_saturation;

	// Token: 0x04001ABE RID: 6846
	private float color_value;

	// Token: 0x04001ABF RID: 6847
	private bool hasAlpha;

	// Token: 0x04001AC0 RID: 6848
	private ColorPicker.BAR_TYPE barType;

	// Token: 0x04001AC1 RID: 6849
	private ColorPicker.SLIDER_TYPE sliderType;

	// Token: 0x04001AC2 RID: 6850
	private static readonly string[] SliderNames_HSV = new string[]
	{
		"色相",
		"彩度",
		"明度",
		"透明"
	};

	// Token: 0x04001AC3 RID: 6851
	private static readonly string[] SliderNames_RGB = new string[]
	{
		"赤色",
		"緑色",
		"青色",
		"透明"
	};

	// Token: 0x04001AC4 RID: 6852
	private static readonly float[] SliderMax_HSV = new float[]
	{
		359f,
		255f,
		255f,
		255f
	};

	// Token: 0x04001AC5 RID: 6853
	private static readonly float[] SliderMax_RGB = new float[]
	{
		255f,
		255f,
		255f,
		255f
	};

	// Token: 0x04001AC6 RID: 6854
	private int ShaderProperty_Red;

	// Token: 0x04001AC7 RID: 6855
	private int ShaderProperty_Green;

	// Token: 0x04001AC8 RID: 6856
	private int ShaderProperty_Blue;

	// Token: 0x04001AC9 RID: 6857
	private int ShaderProperty_Hue;

	// Token: 0x04001ACA RID: 6858
	private int ShaderProperty_Saturation;

	// Token: 0x04001ACB RID: 6859
	private int ShaderProperty_Value;

	// Token: 0x04001ACC RID: 6860
	private bool invoke = true;

	// Token: 0x04001ACD RID: 6861
	private Action<Color> onChange;

	// Token: 0x0200039D RID: 925
	public enum SLIDER_TYPE
	{
		// Token: 0x04001ACF RID: 6863
		HSV,
		// Token: 0x04001AD0 RID: 6864
		RGB
	}

	// Token: 0x0200039E RID: 926
	public enum BAR_TYPE
	{
		// Token: 0x04001AD2 RID: 6866
		H,
		// Token: 0x04001AD3 RID: 6867
		S,
		// Token: 0x04001AD4 RID: 6868
		V,
		// Token: 0x04001AD5 RID: 6869
		R,
		// Token: 0x04001AD6 RID: 6870
		G,
		// Token: 0x04001AD7 RID: 6871
		B
	}
}
